﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;

namespace Dycox.Workflows
{
    internal class ContractInfo
    {
        internal static readonly Type BaseContractType = typeof(StageOperationContract);

        public ContractInfo(Type type)
        {
            if (type == null)
                throw new ArgumentNullException("type");

            if (type.IsAbstract || (!type.IsSubclassOf(BaseContractType) && type != BaseContractType))
                throw new ArgumentException(SR.GetString("invalid_contract_type", type.FullName));

            _type = type;
            _propertyValues = new NameValueCollection();
        }

        private readonly Type _type;

        public Type Type
        {
            get { return _type; }
        }

        private NameValueCollection _propertyValues;

        public NameValueCollection PropertyValues
        {
            get { return _propertyValues; }
        }

    }
}
